﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVISOutBound.SSOServer.Orders
{
    public interface IOrderRepository
    {
        /// <summary>
        /// 获取指定的订单号数据
        /// </summary>
        /// <param name="orderNo">订单号</param>
        /// <param name="surname">用户的姓</param>
        /// <returns></returns>
        Order GetOrder(string orderNo, string surname = "");

        /// <summary>
        /// 保存订单到数据库
        /// </summary>
        /// <param name="order">订单</param>
        void SaveOrder(Order order);

        /// <summary>
        /// 更新订单状态
        /// </summary>
        /// <param name="order">订单</param>
        Task UpdateOrderStatus(Order order);

        ///// <summary>
        ///// 取消预定
        ///// </summary>
        ///// <param name="order">订单</param>
        //void CancelOrder(Order order);

        ///// <summary>
        ///// 更新订单的YouyouOrderID
        ///// </summary>
        ///// <param name="orderNo">订单号</param>
        ///// <param name="youyouOrderID"></param>
        //void UpdateYouyouOrderID(string orderNo, int youyouOrderID);

        /// <summary>
        /// 获取过期订单列表
        /// </summary>
        /// <returns></returns>
        List<string> GetExpiredOrders();

        /// <summary>
        /// 更新订单备注
        /// </summary>
        /// <param name="orderNo">订单号</param>
        /// <param name="remark">备注</param>
        /// <returns></returns>
        Task UpdateRemark(string orderNo, string remark);
    }
}
